<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<title>机会分类</title>	
	<style type="text/css">
		body{
			margin-top:70px;
			background-color:#ccc;
		}
		.container-fluid{
			margin-left:300px;
			}

	</style>

</head> 

<body>
	<%@ include file="include/base.jsp" %>
	<%@ include file="include/base-after.jsp" %>
	<div class="container-fluid">
		<div class="row-fluid">

				<div class="span8" style="margin-top:70px;">

					<div class="well screen">

						<div class="page-header header" >

							<h3>机会分类</h3>



						</div>
						<div id="parties_loading"  class="live_search_spinner">

							<div class="liner">

							</div>

						</div>

					<div id="main" class="main">

							<div id="task_filter">

							</div>

							<div id="upcoming_tasks"><div id="screen_body">

						<div class="tasks tomorrow">

								<div class="task checkbox" id="task_22989">

										<div >

										添加分类会自动增加类别，可以添加不同机会，以备查询使用<br/> 请确认您的添加会通知到所有同事。

										</div><br/>
											<form action="savechanceItem.jspx" name="myform" method="post">
												<input type="hidden" name="chance.id" value="${chance.id}"/>
												<div class="well" style="background-color:#d9edf7">
														<div id="div2">
	
															<input type="text" id="name" name="chanceItem.chancename"/>
		
															<input type="button" value="添加" id="btn">
	
														</div>
												</div>
												<div id="ddd">
													<hr/>
													<c:forEach items="${chanceItemList}" var="ch">
														<div class="sss">
															<a href="javascript:;"><img src="image/fen.png" alt="" class="fen"></a>
															<span id="pan">
																<input type="text" value="${ch.chancename}"/>
																</span>
																<span style="margin-left:40px;">
																	<a href="editchanceItem.jspx?id=${ch.id}" onclick="return confirm('确定将该机会类别删除吗？')" style="text-decoration:none;"><img src="image/edit.png" id="edit"/></a>
																	<a href="delchanceItem.jspx?id=${ch.id}"><img src="image/del.png" id="del"/></a>
																</span>	
															</div>
													</c:forEach>
													<div id="hidden" style="display:none;">
	
															<div class="sss">
	
																<img src="image/fen.png" alt="">
	
																<span id="pan">
	
																</span>
																<span style="margin-left:40px;">
	
																	<a href="javascript:;"><img src="image/edit.png" id="edit"/></a>
	
																	<a href="javascript:;"><img src="image/del.png" id="del"/></a>
	
																</span>
	
															</div>

														</div>

													</div>

													<br/><br/>

													<div id="div3">

														<img src="image/xiao.png" id=""/><input type="submit" value="完成编辑，返回">

													</div>
												</form>

										</div>

									</div>

								</div>

							</div>	
						</div>	
					</div>
				</div>
			</div>
		</div>
	
			<script type="text/javascript">
				$("#btn").click(function(){
					var aa = document.myform.name.value;

					var pan = $("#hidden .sss").clone();

					pan.find("#pan").text(aa);

					pan.appendTo($("#ddd"));

				});
				$("#name1").attr("style","display:none;");
				$("#btn3").attr("style","display:none;");
				$("#btn4").attr("style","display:none;");
				$("#del").live("click",function(){

					if(confirm("是否要删除这个分类")){

						$(this).parent("a").parent("span").parent(".sss").remove();

					}

				});
		</script>
</body>

</html>